#coding:utf-8
'''
Created on 2019年3月13日

@author: wps
'''

from sqlalchemy.sql.schema import Column
from app import db
from sqlalchemy.sql import sqltypes
import datetime
from lxml.html.builder import COL



class AuthorInfo(db.Model):
    """作者信息
    """
    __tablename__ = 'author_info'#表名
    id = Column(sqltypes.Integer, primary_key = True,autoincrement=True)
    author_id = Column(sqltypes.String(20),nullable=True,doc="用户ID")
    avatar = Column(sqltypes.String(512),nullable=True,doc="用户头像")
    nickname = Column(sqltypes.String(100),doc="作者描述")
    description = Column(sqltypes.String(512),doc="作者描述")
    has_video = Column(sqltypes.String(200),doc="是否有视频")
    has_article = Column(sqltypes.String(200),doc="是否有文章")
    wemedia_author_share = Column(sqltypes.String(512),doc="作者主页")
    
    show_article = Column(sqltypes.String(200),doc="文字数量")
    show_video = Column(sqltypes.String(200),doc="视频数量")
    
    pv_id = Column(sqltypes.String(200),doc="pvID")
    pv_num = Column(sqltypes.String(200),doc="展示量")
    pv_num_show = Column(sqltypes.String(200),doc="展示量")
    
    fav_num_show = Column(sqltypes.String(200),doc="点赞量展示")
    fav_num = Column(sqltypes.String(200),doc="点赞量")
    
    follow_num = Column(sqltypes.String(30),doc="粉丝数量")
    follow_num_show = Column(sqltypes.String(30),doc="粉丝数量展示")
    
    exponent_type_top_show = Column(sqltypes.String(200),doc="")
    exponent_type_top = Column(sqltypes.String(200),doc="")
    
    type_str = Column(sqltypes.String(200),doc="类型")
    type_show_str = Column(sqltypes.String(200),doc="类型展示")
    author_information = Column(sqltypes.String(200),doc="信息")
    create_time = Column(sqltypes.DateTime, default=datetime.datetime.now,doc="创建时间")
    
    
class ArticleList(db.Model):
    
     __tablename__ = 'articles_info'#表名
     id = Column(sqltypes.Integer, primary_key = True,autoincrement=True)
     date_str = Column(sqltypes.String(30),doc="日期标签")
     title = Column(sqltypes.String(200),doc="标题")
     content = Column(sqltypes.Text,doc="内容")
     source = Column(sqltypes.String(100),doc="来源")
     create_time = Column(sqltypes.DateTime, default=datetime.datetime.now,doc="创建时间")